<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
<script type="text/javascript">
    var q = parseInt(prompt("请输入一个数",153));
    var s = q;
    var x = (s%10);
    console.log(x);
    s = parseInt(s/10);
    var y = (s%10);
     console.log(y);
    s = parseInt(s/10);
    var z =parseInt(s%10);
     console.log(z);
    if(((x*1)+(y*10)+(z*100)) == (x*x*x + y*y*y + z*z*z)){
      alert("这是一个水仙花数");
    }else{
    	alert("这不是一个水仙花数");
    }

</script>
	
</body>
</html>